package com.my.test.java.zhtx;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DBConnection {

	public static String MYSQL = "com.mysql.jdbc.Driver";
	static{
		try {
			Class.forName(MYSQL);
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		}
	}
	public static Connection getConn(String url,String user,String pwd){
		Connection conn = null;
		try {
			conn = DriverManager.getConnection(url,user,pwd);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return conn;
	}
	
}
